{include file="public/header"/}

{include file="public/navleft"/}
<style>
    .laytable-cell-checkbox, .laytable-cell-numbers, .laytable-cell-radio, .laytable-cell-space{
        padding-top: 3px;
    }
</style>
<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        外送组套地区差异检索
    </div>
    <ol class="am-breadcrumb">
        <li><a href="{:url('index/index')}" class="am-icon-home">首页</a></li>
        <li><a href="#">表单</a></li>
        <li class="am-active">外送</li>
    </ol>
    <div class="tpl-portlet-components">
        <div class="portlet-title">
            <div class="caption font-green bold">
                <span class="am-icon-code"></span> 列表
            </div>

           <script>
                function outgoing(){
                    layui.use('table', function () {
                        var cc = $("#ac").val();
                        var table = layui.table;
                        table.render({
                            elem: '#demo'
                            , height: 350
                            ,width:1018
                            , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板*
                            , url: '/index.php/index/extra/OutgoingBytime/' //数据接口
                            , where: {S_SampleTime: cc}
                            , request: {
                                S_SampleTime: 'S_SampleTime'
                            }
                            , cols: [[ //表头
                                {type: 'checkbox', fixed: 'left'}
                                , {field: 'S_Barcode', title: '条码', width: 130, sort: true,}
                                , {field: 'S_OperationName', title: '客户名称', width: 250 }
                                , {field: 'S_Patient', title: '姓名', width: 100 }
                                , {field: 'S_shosiptal', title: '组套外送区域', width: 140, edit: 'text'}
                                , {field: 'outhosiptal', title: '单项外送区域', width: 140, edit: 'text'}
                                , {field: 'S_CheckName', title: '小项名称(区域不一致小项)', width: 200, edit: 'text'}
                            ]]
                        });
                    })};
            </script>

        </div>
        <div class="tpl-block ">
            <div class="am-g tpl-amazeui-form">
                <div class="am-u-sm-12 am-u-md-9">
                    <input class="layui-btn layui-btn-sm "  value="{:date('Y-m-d ')}" lay-event="getCheckData" id = "ac"></input>
                    <button class="layui-btn layui-btn-sm layui-bg-blue" lay-event="getCheckLength"  id="refuse"  onclick="outgoing()">检索</button>
                    <table id="demo" lay-filter="demo">
                    </table>
                    <script>
                        layui.use('table', function () {
                            var cc = $("#ac").val();
                            var table = layui.table;
                            table.render({
                                elem: '#demo'
                                , height: 350
                                ,width:1018
                                , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板*
                                , url: '/index.php/index/extra/OutgoingBytime/' //数据接口
                                , where: {S_SampleTime: cc}
                                , request: {
                                    S_SampleTime: 'S_SampleTime'
                                }
                                , cols: [[ //表头
                                    {type: 'checkbox', fixed: 'left'}
                                    , {field: 'S_Barcode', title: '条码', width: 130, sort: true,}
                                    , {field: 'S_OperationName', title: '客户名称', width: 250 }
                                    , {field: 'S_Patient', title: '姓名', width: 100 }
                                    , {field: 'S_shosiptal', title: '组套外送区域', width: 140, edit: 'text'}
                                    , {field: 'outhosiptal', title: '单项外送区域', width: 140, edit: 'text'}
                                    , {field: 'S_CheckName', title: '小项名称(区域不一致小项)', width: 200, edit: 'text'}
                                ]]
                            });
                        });


                        // 执行搜索，表格重载
                        $('#refuse').on('click', function () {

                            alert(1);
                            // 搜索条件
                            var send_name = $('#demo').val();

                            table.reload('tableOne', {
                                method: 'get'
                                , where: {
                                    'csrfmiddlewaretoken': token,

                                }
                                , page: {
                                    curr: 1
                                }
                            })
                        });

                    </script>



                </div>
            </div>
        </div>

    </div>



</div>

{include file="public/footer"/}